#ifndef DRAWING_H
#define DRAWING_H

#include <QPainter>
#include <QVector2D>
#include <QPoint>
#include <Texture.h>

class Drawing
{
    public:
        virtual void draw(QPainter*);
        QList<QPoint*> vertexs() const;
        void setVertexs(QList<QPoint*>);
        bool wired();
        void setWired(bool);
        bool filled();
        void setFilled(bool);
        QList<QColor*> colors() const;
        void setColors(QList<QColor*>);
        Texture* texture();
        void setTexture(Texture*);
    protected:
        QList<QPoint*> m_vertexs;
        QList<QColor*> m_colors;
        Texture* m_texture;
        bool m_wired;
        bool m_filled;
        bool pointLessThan(QPoint* p1 ,QPoint* p2);
        QVector2D generateVector(QPoint p1,QPoint p2);
        QVector2D projectFromZeroUpToOne(QVector2D v1, QVector2D v2);
};

#endif // DRAWING_H
